Installing
Jopi Remote Call is designed to work in 4 different environments:
- In the browser.
- Hosted by a NodeJS server.
- Hosted by a BunJS server.
- In an ElectronJS application (server side)
coming feature
. - In a Cordova application (mobile).
- In a Capacitor application (mobile).
The main Jopi Remote Call library is agnostic: the same code works in a browser or on a server.
Switching the runtime environment is simple: you just need to change a dependency. For example, replace the package
@jopi-remote-desktop/nodejs
with @jopi-remote-desktop/bunjs
.
The system installs and configures itself automatically. Once the package is imported, it does the rest and your source code does not change when you switch from Node.js to Bun.js (or vice versa). In addition, abstractions are provided to smooth out some differences between Bun.js and Node.js, for example regarding how to work with
fetch
andReadableStream
from the WEB API (currently with Node v22, support has significant gaps).
- Browser
- NodeJS
- BunJS
npm install jopi-remote-desktop --save
npm install jopi-remote-desktop --save
npm install @jopi-remote-desktop/nodejs --save
// It's the only thing to do in order to enabled NodeJS functionalities.
import "@jopi-remote-desktop/nodejs";
npm install jopi-remote-desktop --save
npm install @jopi-remote-desktop/bunjs --save
// It's the only thing to do in order to enabled BunJS functionalities.
import "@jopi-remote-desktop/bunjs";